package cn.com.dhcc.adam.spring.bean;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import cn.com.dhcc.adam.spring.Service;

public class BeanTest {
	public static void main(String[] args) {
		new BeanTest().test1();
	}
	private final ApplicationContext appContext =
			new ClassPathXmlApplicationContext(new String[] {"springcontainer/services2.xml"});
	public  final  void test1(){
			Service srv = appContext.getBean("srvForFactory", Service.class);
			System.out.println(srv.formatedInfo());
	}
}
